package com.blogspot.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.blogspot.service.BlogspotService;

@Controller
@RequestMapping("/welcome")
public class WelcomeController  {

    private Logger logger = LoggerFactory.getLogger(WelcomeController.class);

    @Autowired
    BlogspotService bs;

    /**
     * LOGIN登入頁面
     * @param model 
     * @return String 
     */
    @RequestMapping(method = RequestMethod.GET)
    public String getPage(Model model) {
    	logger.error("Allan Test");
    	//test();
        return "/welcome";
    }

	private void test() {
		// TODO Auto-generated method stub
    	logger.error(bs.getTestTable().getName());
	}
}
